<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateAgentAccountDetailsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('agent_account_details', function (Blueprint $table) {
            $table->increments('id');
            $table->bigInteger('agent_id');
            $table->decimal('number');
            $table->tinyInteger('type')->default('1')->comment('1收入，-1支出');
            $table->bigInteger('video_id')->nullable()->default(0);
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('agent_account_details');
    }
}
